home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Help / locale / help / english / sys / assign.doc < prev    next >
Encoding:
Text File  |  2000-10-06  |  6.8 KB  |  197 lines

  1. ASSIGN
  2.  
  3. Controls assignment of logical device names to files or directories.
  4.  
  5. Format
  6.  
  7. ASSIGN [<name>:] [{<target>}] [LIST] [EXISTS] [DISMOUNT] [DEFER] [PATH] [ADD]
  8. [REMOVE] [VOLS] [DIRS] [DEVICES]
  9.  
  10. Template
  11.  
  12. NAME,TARGET/M,LIST/S,EXISTS/;,DISMOUNT/S,DEFER/S,PATH/S,ADD/S,REMOVE/S,VOLS/S
  13. ,DIRS/S,DEVICES/S
  14.  
  15. Location
  16.  
  17. C:
  18.  
  19. ASSIGN allows references to files or directories with short, convenient
  20. logical device names, rather than their usual names or complete paths. The
  21. ASSIGN command can create assignments, remove assignments, or list some or
  22. all current assignments.
  23.  
  24. If the <name> and {<target>} arguments are given, ASSIGN assigns the given
  25. logical name to the specified target. Each time the assigned logical device
  26. name is referred to, AmigaDOS accesses the specified target. If the <name>
  27. given is already assigned to a file or directory, the new target replaces the
  28. previous one. A colon must be included after the <name> argument.
  29.  
  30. If only the <name> argument is given, any existing ASSIGN of a file or
  31. directory to that logical device name is cancelled.
  32.  
  33. You can assign several logical device names to the same target by using
  34. multiple ASSIGN commands.
  35.  
  36. You can assign one logical device name to several targets by specifying each
  37. file or directory after the <name> argument or by using several ASSIGN
  38. commands with the ADD option. Specifying the ADD option does not replace any
  39. existing target assigned to <name>. This target is added to the ASSIGN list
  40. and the system searches for all the targets when <name> is encountered. If
  41. the first target is not available, ASSIGN uses the next target added.
  42.  
  43. The REMOVE option deletes a target name from the ASSIGN list.
  44.  
  45. If no arguments are given with ASSIGN or if the LIST keyword is used, a list
  46. of all current assignments is displayed. If the VOLS, DIRS, or DEVICES switch
  47. is specified, ASSIGN limits the display to volumes, directories, or devices.
  48.  
  49. When the EXISTS keyword is entered with a logical device name, AmigaDOS
  50. searches the ASSIGN list for that name and displays the volume and directory
  51. assigned to that device. If the device name is not found, the condition flag
  52. is set to 5 (WARN).
  53.  
  54. When the {<target>} argument is given, AmigaDOS immediately looks for that
  55. file or directory. If the ASSIGN commands are part of the User-startup, the
  56. targets must be present on a mounted disk during the boot procedure. If an
  57. assigned target cannot be found, a requester asks for the volume containing
  58. it. However, using the DEFER and PATH options make the system wait until the
  59. target is needed before searching for it.
  60.  
  61. Note:
  62.  
  63. The assigned name does not have to retain the name of the file or directory
  64. and it does not have to be in upper case. For example, the name CLIPS: or
  65. Clips: can be assigned to the Ram Disk:Clipboards directory.
  66.  
  67. The DEFER option creates a late-binding ASSIGN. This ASSIGN takes effect when
  68. the assigned object is first referenced, rather than when the assignment is
  69. made. When the DEFER option is used, the disk containing the assigned target
  70. is not needed until the object is called. The assignment then remains valid
  71. until explicitly changed.
  72.  
  73. If you ASSIGN FONTS: to DF0:Fonts with the DEFER option, the system
  74. associates FONTS: with the disk that is in DF0: when FONTS: is referred to.
  75. For example, if you have a Workbench disk in DF0: at the time the FONTS:
  76. directory is needed, the system associates FONTS: with that particular
  77. Workbench disk. If you later remove that Workbench disk and insert another
  78. disk containing a Fonts directory, the system specifically requests the
  79. original Workbench disk the next time FONTS: is needed.
  80.  
  81. The PATH option creates a non-binding ASSIGN. A non-binding ASSIGN acts like
  82. a DEFERed ASSIGN, except that is re-evaluated each time the assigned name is
  83. referenced. For example, if you assign FONTS: to DF0:Fonts with the PATH
  84. option, any disk in DF0: is searched when FONTS: is referenced. As long as
  85. the disk contains a Fonts directory, it satisfies the ASSIGN. You cannot
  86. assign multiple directories with the PATH option.
  87.  
  88. Floppy disk only system users can find that using the PATH option eliminates
  89. the need to reinsert the original Workbench disk used to boot the system. As
  90. long as the drive you assigned with the PATH option contains a disk with the
  91. assigned directory name, the system uses that disk.
  92.  
  93. The DISMOUNT option disconnects a volume or device from the list of mounted
  94. devices. You must provide the device name in the argument. DISMOUNT removes
  95. the name form the list, but does not free resources. You cannot cancel a
  96. DISMOUNT without rebooting. DISMOUNT is meant for use by software developers
  97. only and can cause a software failure if not used carefully.
  98.  
  99. Example 1:
  100.  
  101. 1> ASSIGN FONTS: MyFonts:Fontdir
  102.  
  103. assigns the FONTS: directory to Fontdir on MyFonts:
  104.  
  105. Example 2:
  106.  
  107. 1> ASSIGN LIST
  108. Volumes:
  109. Ram Disk [Mounted]
  110. Workbench [Mounted]
  111. MyFonts [Mounted]
  112.  
  113. Directories:
  114. LOCALE Workbench:Locale
  115. KEYMAPS Workbench:Devs/Keymaps
  116. PRINTERS Workbench:Devs/Printers
  117. REXX Workbench:S
  118. CLIPS Ram Disk:Clipboards
  119. ENV Ram Disk:Env
  120. T Ram Disk:T
  121. ENVARC Workbench:Prefs/Env-Archive
  122. SYS Workbench:
  123. C Workbench:C
  124. S Workbench:S
  125. L Workbench:L
  126. FONTS MyFonts:Fontdir
  127. DEVS Workbench:Devs
  128. LIBS Workbench:Libs
  129. + Workbench:Classes
  130.  
  131. Devices:
  132. PIPE AUX RAM CON
  133. RAW PAR SER PRT DF0
  134.  
  135. Shows a typical list of all current assignments. The plus sign indicates any
  136. additional directories with the same assignment.
  137.  
  138. Example 3:
  139.  
  140. 1> ASSIGN FONTS: EXISTS
  141. FONTS: MyFonts:FontDir
  142.  
  143. is an inquiry into the assignment of FONTS:. AmigaDOS responds by showing
  144. that FONTS: is assigned to the FontDir directory of the MyFonts volume. The
  145. return code is set to 0 if it exists or to 5 if it does not.
  146.  
  147. Example 4:
  148.  
  149. 1> ASSIGN LIBS: SYS:Libs BigAssem:Libs ADD
  150.  
  151. is a multiple-directory assignment that creates a search path containing two
  152. Libs directories. Specifying ADD keeps the standard SYS:Classes assignment
  153. from being removed. These directories are searched in sequence each time
  154. LIBS: is invoked.
  155.  
  156. Example 5:
  157.  
  158. 1> ASSIGN DEVS:
  159.  
  160. removes the DEVS: assignment from the system.
  161.  
  162. Example 6:
  163.  
  164. 1> ASSIGN WorkDisk: DF0: DEFER
  165. 1> ASSIGN WorkDisk: EXISTS
  166. WorkDisk <DF0:>
  167.  
  168. sets up a late-binding assignment of the logical device WorkDisk:. Until the
  169. first time you refer to the name WorkDisk:, you do not need to insert it in
  170. DF0: ASSIGN shows DF0: enclosed in angle brackets to indicate that it is
  171. DEFERred. After the first reference to WorkDisk:, the volume name of the disk
  172. that was in DF0: replaces <DF0:>.
  173.  
  174. Example 7:
  175.  
  176. 1> ASSIGN C: DF0:C PATH
  177. 1> ASSIGN C: EXISTS
  178. C [Df0: C]
  179.  
  180. references the C directory fo the disk that is in DF0: when a command is
  181. searched for. ASSIGN shows DF0:C in square brackets to indicate that it is a
  182. non-binding ASSIGN.
  183.  
  184. Example 8:
  185.  
  186. 1> ASSIGN LIBS: Zcad:Libs ADD
  187.  
  188. adds Zcad:Libs to the list of directories assigned as LIBS:.
  189.  
  190. Example 9:
  191.  
  192. 1> ASSIGN LIBS: Zcad:Libs REMOVE
  193.  
  194. removes Zcad:Libs from the list of directories assigned as LIBS:.
  195.  
  196. For more examples using ASSIGN, see Chapter 8.
  197.